<?php

namespace App\Models;

class RedeemLog extends Model
{
    protected $fillable = [
        'company_userid', 'user_id', 'prize_id', 'filiale_id', 'remark'
    ];

    public function manager()
    {
        return $this->belongsTo(User::class, 'company_userid');
    }

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    public function filiale()
    {
        return $this->belongsTo(Filiale::class, 'filiale_id');
    }

    public function prize()
    {
        return $this->belongsTo(Prize::class, 'prize_id');
    }
}
